<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>33仿小米logo切换效果</title>
    <style>
        .box {
            width: 192px;
            height: 192px;
            overflow: hidden;
        }
        
        .box .logo {
            transition: all .2s;
        }
        
        .box:hover .logo {
            margin-left: -192px;
        }
    </style>
</head>

<body>
    <div class="box">
        <a href="#"><img src="./images/logo.png" alt="" class="logo"></a>
    </div>
</body>

</html>